package org.springframework.web.servlet.mvc.support;


public class DynamicHandlerMapping extends ControllerClassNameHandlerMapping{
    private String  path = "/*";
    private String theOneControllerName = "org.groovyflow.spring.web.RouterController";

    @Override
    protected String generatePathMapping(Class beanClass) {
         return path;
    }
    @Override
    protected boolean isEligibleForMapping(String beanName, Class beanClass) {
        return theOneControllerName.equals(beanName);
    }

    public void setPath(String path) {
        this.path = path;
    }

    public void setTheOneControllerName(String theOneControllerName) {
        this.theOneControllerName = theOneControllerName;
    }

}